import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LayoutProComponent } from './layout/pro/pro.component';
import { LayoutModule } from './layout/layout.module';
import { generalSituationComponent } from './generalSituation/generalSituation.component';
import { GeneralSituationModule } from './generalSituation/generalSituation.module';
import { PurchaseModule } from './purchase/purchase.module';
const routes: Routes = [
  { path: '', 
    redirectTo:'/general',
    pathMatch: "full"
  },
  {
    path: '',
    component: LayoutProComponent,
    data:{
    },
    children:[
      {
        path:'general',
        component: generalSituationComponent,
        data:{
          breadcrumb:'概况'
        }
      },
      {
        path:'purchase',
        loadChildren: () => import('./purchase/purchase.module').then(m => m.PurchaseModule),
      }
    ]
  },
  { path: '', 
    loadChildren: () => import('./login/login.module').then(m => m.LoginModule),
   },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
